package com.qpf.spring.cloud.service.admin.service.impl;

import com.qpf.spring.cloud.commons.dto.BaseResult;
import com.qpf.spring.cloud.commons.mapper.UserMapper;
import com.qpf.spring.cloud.service.admin.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(readOnly = true)
public class DemoServiceImpl implements DemoService {

    private UserMapper userMapper;

    @Autowired
    public DemoServiceImpl(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    @Override
    public BaseResult selectAll() {
        return BaseResult.OK(userMapper.selectAll());
    }
}
